]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
recorder: keep test-recorder alive until done recording
authorRay Strode <rstrode@redhat.com>
Thu, 26 Jul 2012 21:44:56 +0000 (17:44 -0400)
committerRay Strode <rstrode@redhat.com>
Fri, 26 Oct 2012 17:29:30 +0000 (13:29 -0400)
Recording continues for some time after the recorder object
is closed, since closing isn't a synchronous operation.

This commit defers quiting the test-recorder application until
the recording is finished.

https://bugzilla.gnome.org/show_bug.cgi?id=680647

src/test-recorder.c

index 69f6f601fc5fbd037c56acb900e359ca6bcde10c..599266a70db1f726d8cb689fe40329b69b4f798d 100644 (file)
@@ -16,10 +16,20 @@ stop_recording_timeout (ClutterActor *stage)
   if (recorder)
     {
       shell_recorder_close (recorder);
+
+      /* quit when the recorder finishes closing
+       */
+      g_object_weak_ref (G_OBJECT (recorder),
+                         (GWeakNotify)
+                         clutter_actor_destroy,
+                         stage);
+
       g_object_unref (recorder);
     }
-
-  clutter_actor_destroy (stage);
+  else
+    {
+      clutter_actor_destroy (stage);
+    }
 
   return FALSE;
 }